package com.walleipt;

import java.util.Iterator;
import java.util.ServiceLoader;

public class Main {

    public static void main(String[] args) {

        ServiceLoader<HelloService> load = ServiceLoader.load(HelloService.class) ;
        Iterator<HelloService> iter = load.iterator() ;
        while ( iter.hasNext() )
        {
            HelloService service = iter.next() ;
            System.err.println( service.sayHello() );
        }
    }
}
